//
// Created by xili on 2024/8/2 10:10.
// Go big or go home.
//
#include <iostream>
#include <unordered_set>

using namespace std;

class Solution {
public:
    char repeatedCharacter(string s) {
        unordered_set<char> us;
        for (auto &item: s) {
            if (us.count(item)) {
                return item;
            }
            us.emplace(item);
        }
        return 0;
    }
};